<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:p="http://primefaces.org/ui">

<composite:interface>
    <!-- coustom attrs-->
    <composite:attribute name="value"/>
    <composite:attribute name="type" default="enum"/>
</composite:interface>

<composite:implementation>
    <p:outputPanel rendered="#{cc.attrs.type eq 'enum'}">
        <p:tag rendered="#{cc.attrs.value.value eq 0}" value="#{cc.attrs.value.title}" styleClass="p-mr-1"
               severity="success"/>
        <p:tag rendered="#{cc.attrs.value.value eq 1}" value="#{cc.attrs.value.title}" styleClass="p-mr-1"
               severity="info"/>
        <p:tag rendered="#{cc.attrs.value.value eq 2}" value="#{cc.attrs.value.title}" styleClass="p-mr-1"
               severity="warning"/>
        <p:tag rendered="#{cc.attrs.value.value eq 3}" value="#{cc.attrs.value.title}" styleClass="p-mr-1"
               severity="danger"/>
    </p:outputPanel>

    <p:outputPanel rendered="#{cc.attrs.type eq 'bool'}">
        <p:tag rendered="#{cc.attrs.value}" value="#{msg['framework'][cc.attrs.value]}" severity="success"/>
        <p:tag rendered="#{!cc.attrs.value}" value="#{msg['framework'][cc.attrs.value]}" severity="danger"/>
    </p:outputPanel>

</composite:implementation>


</html>